<?php

/**
 * Example class for sending a session back to ActionScript.
 */
class Core_Services_Abstract
{
	/**
	 * Constructor
	 * 
	 * Creates a new session instances if it doesn't alread exists. If
	 * it does exist, regenerates the ID.
	 */
	public function __construct ()
	{
		if ( !Zend_Session::sessionExists() )
		{
			Zend_Session::start ();
		}
	}
	

	/**
	 * Authentication verification method. Kept here for easy access.
	 */
	protected function isAuthenticated()
	{
		if ( !Zend_Auth::getInstance()->hasIdentity() )
		{
			return false;
		}
		
		return true;
	}
}